<?php
/*
 *  FireFly theme
 *  Comments template
 *  (c) 2011, chugylo
 */
?>
<?php if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    die (__('Please do not load this page directly. Thanks!'));
if (post_password_required()) : ?>
                <p class="nopassword"><?php _e('This post is password protected. Enter the password to view any comments.'); ?></p>
            </div>
<?php
        return;
    endif; ?>
                <div id="comments">
                <h3><?php _e('Comments'); echo ' ('; echo get_comments_number(); echo ')'; ?></h3><a name="comments"></a>
                <?php
                if (!comments_open()) : ?>
                <p class="closed_comments"><?php _e('Comments are closed.'); ?></p>
                <?php
                endif;
                if (have_comments()) : ?>
                <ol>
                    <?php $reply_text = __('Reply'); wp_list_comments(); ?>
                </ol><?php endif; // end comment loop ?>
            </div><!--end comments-->
            <?php if (comments_open()) : ?>
            <?php if (get_option('comment_registration') && !$user_ID ) : ?>
            <p class="comments-blocked"><?php _e('You have to '); ?><a href="<?= site_url(); ?>/wp-login.php?redirect_to=
            <?php the_permalink(); ?>"><?php _e('sign in'); ?></a><?php _e(' to comment.'); ?></p>
            <?php else : ?>
            <div id="write-comment">
                <?php comment_form(); ?>
            </div><!--end write-comment-->
            <?php endif; endif; // end registration; end comments_open ?>